Background Jobs view

Administration System Background Jobs Background Jobs view

Prerequisites

The Background Jobs view displays all the background jobs running in the cluster, including the background jobs that you launch from the Actions menu in this view and any reporting, EDI, or Groovy jobs. In addition to these jobs, each yard has a heartbeat background job that runs automatically in the background. You do not need to launch this job. The Background Jobs view also displays other background jobs that run occasionally, such as sending a notification request. N4 displays these jobs in the list view only while they are running. When completed, it removes the jobs from the list view. 

Background Jobs that appear with a bullet under Execute in Cluster are saved to the database. By default, Execute in Cluster is the last column of the view.

Before you begin:

You must set up job groups that are for the specific nodes you want the background jobs to run on. See Job Groups view (on page 1) for more information. The background jobs that are accessed through the Background Jobs view Actions menu, as well as the EDI and Groovy background jobs, can only run on a single node, therefore, the Job Groups you create for these background jobs can only include one node. Background jobs for N4 Automation are not restricted to running on one node (see below).

It is possible to run multiple background jobs on a single node, but it's always a best practice to test this prior to production.

When a node in a job group becomes unresponsive for over three minutes, it fails over (or switches) to run all the jobs on a different node.

To start background jobs:

To stop a background job:

To diagnose a background job problem from the Background Jobs view:

From the Background Jobs (on page 1) view, right-click on the header bar and add the Status Details column header.

The Status Details column contains a long string of logged details regarding each background job. You can use this information for troubleshooting.

Status Details are only displayed for background jobs saved to the database, indicated by a bullet in the Execute in Cluster column.

To recover if a node goes down:

To recover, stop the background job by selecting Actions Halt Job. Restart the job using a different Job Group that's associated with a different node. If a node goes down, N4 changes the Job Group Status of jobs running on that node as follows:

To recover when the Job Status is "Job has multiple triggers"

A network outage or a slow node can cause a job to be restarted, even if the job is still running. The job will have the status "Job has multiple triggers" indicating an error where two instances of the job may be running which can cause other problems. When this happens, halt the job (Actions Halt Job), then reschedule it. For example, if this was an EDI job, go to EDI Jobs to restart the job after halting it.

If this condition recurs it may indicate a bigger problem with the system. Contact Navis support and open a case. Attach the following information prior to halting and restarting the job, as long as operations will allow it:

Automatic recovery if a node goes down:

It is possible that a background job can automatically recover if it runs into issues, such as when the heartbeat from a node is not getting through or you kill the node when shutdown takes too long.

A background job that automatically recovers will have a _recovered suffix added to its name, such as htsched01_recovered. If you see this you can leave the job running per normal and you only need to perform a refresh when a problem is identified, such as a job is hanging or no scheduling is occurring.

Background Jobs for N4 Automation

Background Jobs for N4 Automation are not restricted to running on one node. For instructions for how to set up job groups for the various N4 Automation schedulers, see Set up load balancing (job groups) for schedulers in the Navis N4 Automation Administrator and User Guide.

The AGV, ASC and CHE dispatcher jobs also contain a flag for the Quartz scheduler to delete the job and the trigger, then reschedule a new job based on the original job. This flag can be disabled by applying this Java option to each Tomcat application node:

-Dcom.navis.framework.quartz.rescheduleIfRecoveryEnabled=false

 

Background Jobs Columns

Short Label

Long Label

Sorting?

Class

Job Class

X

Description

Job Description

X

Execute in Cluster

Job Executes in Cluster

X

Fire Time

Job Fire Time

X

Full Name

Full Job Name

X

Job Group Status

Job Group Status

X

Job Node Group

Job Group to Execute Job

X

Name

Job Name

X

Next Fire Time

Job Next Fire Time

X

Previous Fire Time

Job Previous Fire Time

X

Status

Stateful Job Status

X

Status Detail

Status Detail

X

 

 

For XPS operations

N4 displays the xpsCacheMasterHeartbeat.XPS:<scope><(yard gkey)>.<timestamp> jobs in the list view. It displays one job for each yard that had the XPS State as READY, when the N4 server started. The timestamp displayed in the job name indicates that the connection between the N4 server and XPS server is live.

You can monitor the connection between the N4 servers and the XPS server using the Cluster Services view (on page 1).

 

For EDI operations

The list view displays the scheduled EDI jobs as <scope>/<schedule name> at all times, until the EDI Job is unscheduled or halted. For more information on EDI jobs, see EDI Jobs view (on page 1).

 

Scope level for background jobs

These are guidelines for the scope level you should use for running the various background jobs.

To launch these background jobs...

Log in at scope level...

Problem Solution background jobs (for N4 Automation Schedulers)

Facility

Bento Server (ECN4 Support)

Optimal Transfer Zone Slot Finder

Yard

EDI Jobs

Complex

Groovy Jobs

Depends on the scope of the code extension

Unit Maintenance Jobs

Database Purge/Archive Job

Event Billing Extract Job

Marine Event Billing Extract Job

Update WI Estimated Move Time Job

Facility Level

 

 

Background Jobs view - Actions menu

The Actions menu lists the various background jobs that you can manually start on any node in the cluster. When you select a background job from the Actions menu, N4 displays the Node Selection form (on page 1). Use the Node Selection form to start a background job on a specific node in the cluster.

Each action in the Background Jobs view is secured by a corresponding privilege. You must assign the appropriate privilege to user roles (on page 1) to enable the users to run a background job.

You can use the Actions menu to launch the following background jobs: